<html>
<head><meta charset="utf-8"><title>async/await · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/async.2Fawait.html">async/await</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="192111883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/async/await/near/192111883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/async.2Fawait.html#192111883">(Mar 28 2020 at 08:09)</a>:</h4>
<p>One of the issues I am seeing is no type hints when <code>.await</code> is used. I wanted to confirm that it is not implemented yet. Or am I mistaken and it's a local issue or maybe it's because of other issues?</p>



<a name="192112753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/async/await/near/192112753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/async.2Fawait.html#192112753">(Mar 28 2020 at 08:38)</a>:</h4>
<p>the basic of await infer was implemented in <a href="https://github.com/rust-analyzer/rust-analyzer/pull/2661" title="https://github.com/rust-analyzer/rust-analyzer/pull/2661">https://github.com/rust-analyzer/rust-analyzer/pull/2661</a>.</p>



<a name="198219155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/async/await/near/198219155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/async.2Fawait.html#198219155">(May 20 2020 at 15:57)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">call_this_async_fn</span><span class="p">().</span><span class="k">await</span><span class="p">;</span><span class="w"></span>
</code></pre></div>



<a name="198219255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/async/await/near/198219255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/async.2Fawait.html#198219255">(May 20 2020 at 15:57)</a>:</h4>
<p>The type for <code>call_this_async_fn()</code> is good, but then <code>b</code> becomes <code>unknown</code> because of <code>await</code></p>



<a name="198219405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/async/await/near/198219405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/async.2Fawait.html#198219405">(May 20 2020 at 15:58)</a>:</h4>
<p>I am not sure if <code>await</code> keyword support is implemented or not</p>



<a name="198219804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/async/await/near/198219804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/async.2Fawait.html#198219804">(May 20 2020 at 16:01)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/1791">rust-analyzer#1791</a></p>



<a name="198219843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/async/await/near/198219843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/async.2Fawait.html#198219843">(May 20 2020 at 16:01)</a>:</h4>
<p>it's implemented, but many cases require return position impl trait, which is not</p>



<a name="198220906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/async/await/near/198220906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/async.2Fawait.html#198220906">(May 20 2020 at 16:09)</a>:</h4>
<p>Thanks. I understand now. I guess, it needs to be fixed in chalk</p>



<a name="198221943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/async/await/near/198221943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/async.2Fawait.html#198221943">(May 20 2020 at 16:18)</a>:</h4>
<p>we're waiting for the impl trait support in Chalk to be finished, and then we need to implement it in rust-analyzer</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>